# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python2-terminaltables
pkgver=3.1.0
pkgrel=6
pkgdesc='Generate simple tables in terminals from a nested list of strings.'
arch=('any')
url='https://pypi.org/project/terminaltables/#files'
license=('MIT')
makedepends=('python2' 'python2-setuptools')
depends=('python2')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/terminaltables-$pkgver.tar.gz")
sha512sums=('f30620f57c4d40b4ee5736d2886e744f7ed34aae702252b2ecf90844d314c4ccce7a7bc9146637504e6996c148567ba16247136f081f086a2b264f2f4920ecd8')

build() {
  cd "terminaltables-$pkgver"

  python2 setup.py build
}

package() {
  cd "terminaltables-$pkgver"

  python2 setup.py install -O1 --root="$pkgdir" --skip-build

  install -Dm 644 README.rst -t "$pkgdir/usr/share/doc/$pkgname"
}

